package emp.jsf.servicio.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import emp.entidades.EntCajaVenta;
import emp.jsf.servicio.CajaVentaService;
import emp.repositorios.CajaVentaRepository;

@Service("cajaVentaService")
public class CajaVentaServiceImpl implements CajaVentaService{

	@Autowired
	CajaVentaRepository cajaVentaRepository;
	
	public List<EntCajaVenta> listarCajaVenta(){
		return cajaVentaRepository.findAll();
	}
	
	public EntCajaVenta grabarCajaVenta(EntCajaVenta ent){
		return cajaVentaRepository.save(ent);
	}
	
	public void eliminar(EntCajaVenta ent){
		cajaVentaRepository.delete(ent);
	}
	
}
